Specifications:
The expansion board can be used as engraving machine, 3D printer and other drive expansion board, a total of 4 stepper motor drive module slot, (Note: this board does not contain for A4988 stepper motor drive module), can drive 4 road into the motor, and each step stepper motor only need two IO port, that is, 6 IO port can be a very good management of three stepper motor, very easy to use, say goodbye to operation cumbersome in traditional stepper motor .
For UNO and Module IO Port Correspondence Description:
Pin which stepper motor basic control needs, the other pin is in the engraving machine, or used in 3D printer, here we do not make detailed, IO corresponds to the above figure.
8 ------------------------ EN (Stepper motor drive enable side, active low.)
7 ----------------------- Z.DIR (Z-axis direction control.)
6 ----------------------- Y.DIR (Direction control of the Y axis.)
5 ----------------------- X.DIR (Direction control of the X axis.)
4 ---------------------- Z.STEP (Z-axis stepping control.)
3 ---------------------- Y.STEP (Y-axis step control.)
2 ---------------------- X.STEP (X-axis step control.)
The following is a simple stepper motor control program:
#define EN 8 // Stepping motor enable side, active low.
#define X_DIR 5 // X-axis stepper motor direction control.
#define Y_DIR 6 // y-axis stepper motor direction control.
#define Z_DIR 7 // z-axis stepper motor direction control.
#define X_STP 2 // x-axis stepping control.
#define Y_STP 3 // y axis step control.
#define Z_STP 4 // z axis step control.
/ *
// function: step function: control the direction of the stepper motor, the number of steps.
// Parameters: dir direction control, dirPin corresponds to stepper motor DIR pin, stepperPin corresponds to stepper motor step pin, steps step number of steps.
// no return value
* /
Void step (boolean dir, byte dirPin, byte stepperPin, int steps)
{
DigitalWrite (dirPin, dir),
Delay (50),
For (int i = 0, i DigitalWrite (stepperPin, HIGH),
DelayMicroseconds (800),
DigitalWrite (stepperPin, LOW),
DelayMicroseconds (800),
}
}
Void setup () {// Set the IO pin used by the stepper motor to output
PinMode (X_IR, OUTPUT), pinMode (X_STP, OUTPUT),
PinMode (Y_IRP, OUTPUT), pinMode (Y_STP, OUTPUT),
PinMode (Z_D, OUTPUT), pinMode (Z_STP, OUTPUT),
PinMode (EN, OUTPUT),
DigitalWrite (EN, LOW),
}
Void loop () {
Step (false, X_DIR, X_STP, 200), // X-axis motor reverses 1 turn, 200 steps in one lap.
Step (false, Y_DIR, Y_STP, 200), // y-axis motor reverses 1 turn, 200 steps in one lap.
Step (false, Z_DIR, Z_STP, 200), // z-axis motor reverses 1 turn, 200 steps in one lap.
Delay (1000),
Step (true, X_DIR, X_STP, 200), // The X-axis motor is turning 1 turn, 200 steps in one lap.
Step (true, Y_DIR, Y_STP, 200), // y-axis motor is running 1 turn, 200 steps for a circle.
Step (true, Z_DIR, Z_STP, 200), // z-axis motor is running 1 turn, 200 steps for a circle.
Delay (1000),
}
Experimental phenomenon: stepping motor reverse lap, pause 1 second, and then pass a circle, so the cycle.
Note: stepper motor wiring is:
2A, 2B for a group (red, green), 1A, 1B for a group (blue, yellow) want to change direction, change the location of a group can be, such as 2A, and 2B exchange.
Package Includes:
1 x Engraver Expansion Board
3D Printers Accessories
The expansion board can be used as engraving machine, 3D printer and other drive expansion board, a total of 4 stepper motor drive module slot, (Note: this board does not contain for A4988 stepper motor drive module), can drive 4 road into the motor, and each step stepper motor only need two IO port, that is, 6 IO port can be a very good management of three stepper motor, very easy to use, say goodbye to operation cumbersome in traditional stepper motor .